import { Column, Entity, PrimaryColumn } from 'typeorm';

@Entity({ name: 'apply_flyer_list' })
export class ApplyFlyerEntity {
    @PrimaryColumn('varchar', { name: 'id', charset: 'utf8mb4', collation: 'utf8mb4_general_ci' })
    id: string;

    // 账号id accountId，必填
    @Column({ name: 'account_id', type: 'varchar', charset: 'utf8mb4', collation: 'utf8mb4_general_ci'})
    accountId: string;

    // 账号 account
    @Column({ name: 'account', type: 'varchar', charset: 'utf8mb4', collation: 'utf8mb4_general_ci', nullable: true})
    account: string;

    // 姓名 lastName，必填
    @Column({ name: 'name', type: 'varchar', charset: 'utf8mb4', collation: 'utf8mb4_general_ci'})
    name: string;

    // 手机号
    @Column({ name: 'phone', type: 'varchar', charset: 'utf8mb4', collation: 'utf8mb4_general_ci'})
    phone: string;

    // 年龄
    @Column('int', { name: 'age' })
    age: number;

    // 性别
    @Column('int', { name: 'sex' })
    sex: number;

    // 职务
    @Column({ name: 'duty', type: 'varchar', charset: 'utf8mb4', collation: 'utf8mb4_general_ci', nullable: true})
    duty: string;

    // 租户id tenantId || realmId
    @Column({ name: 'tenant_id', type: 'varchar', charset: 'utf8mb4', collation: 'utf8mb4_general_ci', nullable: true})
    tenantId: string;

    // 租户名称 tenantName || realmName，必填
    @Column({ name: 'tenant_name', type: 'varchar', charset: 'utf8mb4', collation: 'utf8mb4_general_ci', nullable: true})
    tenantName: string;

    // 描述
    @Column({ name: 'desc', type: 'varchar', charset: 'utf8mb4', collation: 'utf8mb4_general_ci', nullable: true})
    desc: string;

    // 年飞行时长
    @Column('int', { name: 'year_duration', nullable: true })
    yearDuration: number;

    // 年飞行距离
    @Column('int', { name: 'year_distance', nullable: true })
    yearDistance: number;

    // 年飞行架次
    @Column('int', { name: 'year_count', nullable: true })
    yearCount: number;

    // 总飞行时长
    @Column('int', { name: 'total_duration', nullable: true })
    totalDuration: number;

    // 总飞行距离
    @Column('int', { name: 'total_distance', nullable: true })
    totalDistance: number;

    // 总飞行架次
    @Column('int', { name: 'total_count', nullable: true })
    totalCount: number;

    // 状态： 正常1，已删除2
    @Column('int', { name: 'status' })
    status: number;

}
